package com.mrtaohuan.action.admin;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import com.google.inject.Inject;
import com.mrtaohuan.render.HttpContext;
import com.mrtaohuan.render.freemarker.AbstractFreeMarkerRender;
import com.mrtaohuan.render.freemarker.FreeMarkerRenderer;
import com.mrtaohuan.render.freemarker.Templates;

@Path("/admin")
public class Index {

	@Inject
	HttpContext context;

	@GET
	@Produces(MediaType.TEXT_HTML)
	public String index() {
		final AbstractFreeMarkerRender renderer = new FreeMarkerRenderer();
		renderer.setTemplateName("admin/index");
		renderer.setContext(context);
		return renderer.renderHtml();
	}

}
